#include "file.h"









template <>
x07<A_160>::operator x07<A_174>() const {
    x07<A_174> new_inst;
    new_inst.t = this->t;
    new_inst.k = k;
    new_inst.un1 = this->un1;
    new_inst.ptr1 = this->ptr1;
    new_inst.un2 = this->un5;
    new_inst.refdes_string_ref = this->refdes_string_ref;
    new_inst.ptr2 = this->ptr2;
    new_inst.ptr3 = this->ptr3;
    new_inst.un3 = this->un3;
    new_inst.ptr4 = this->ptr4;
    return new_inst;
}





template <>
x09<A_172>::operator x09<A_174>() const {
    x09<A_174> new_inst;
    new_inst.t = this->t;
    new_inst.k = this->k;
    for (uint8_t i = 0; i < 4; i++) {
        new_inst.un1[i] = this->un1[i];
    }
    new_inst.ptr1 = this->ptr1;
    new_inst.ptr2 = this->ptr2;
    new_inst.un2 = this->un2;
    new_inst.ptr3 = this->ptr3;
    new_inst.ptr4 = this->ptr4;
    return new_inst;
}



template <>
x0A<A_172>::operator x0A<A_174>() const {
    x0A<A_174> new_inst;
    new_inst.t = this->t;
    new_inst.subtype = this->subtype;
    new_inst.layer = this->layer;
    new_inst.k = this->k;
    new_inst.next = this->next;
    new_inst.un1 = this->un1;
    for (uint8_t i = 0; i < 4; i++) {
        new_inst.coords[i] = this->coords[i];
    }
    new_inst.un2 = this->un2;
    new_inst.un3 = 0;
    for (uint8_t i = 0; i < 4; i++) {
        new_inst.un4[i] = this->un4[i];
    }
    for (uint8_t i = 0; i < 4; i++) {
        new_inst.un5[i] = this->un5[i];
    }
    return new_inst;
}



template <>
x0C<A_172>::operator x0C<A_174>() const {
    x0C<A_174> new_inst;
    new_inst.t = this->t;
    new_inst.subtype = this->subtype;
    new_inst.layer = this->layer;
    new_inst.k = this->k;
    new_inst.next = this->next;
    for (int i = 0; i < 11; i++) {
        new_inst.un[i] = this->un[i];
    }
    new_inst.un2 = this->un2;
    new_inst.un3 = this->un3;
    return new_inst;
}



template <>
x0D<A_172>::operator x0D<A_174>() const {
    x0D<A_174> new_inst;
    new_inst.t = this->t;
    new_inst.k = this->k;
    new_inst.str_ptr = this->str_ptr;
    new_inst.ptr2 = this->ptr2;
    for (int i = 0; i < 2; i++) {
        new_inst.coords[i] = this->coords[i];
    }
    new_inst.pad_ptr = this->pad_ptr;
    new_inst.un1 = this->un1;
    new_inst.un2 = this->un2;
    new_inst.bitmask = this->bitmask;
    new_inst.rotation = this->rotation;
    return new_inst;
}





template <>
x0F<A_172>::operator x0F<A_174>() const {
    x0F<A_174> new_inst;
    new_inst.t = this->t;
    new_inst.k = this->k;
    new_inst.ptr1 = this->ptr1;
    for (int i = 0; i < 32; i++) {
        new_inst.s[i] = this->s[i];
    }
    new_inst.ptr2 = this->ptr2;
    new_inst.ptr3 = this->ptr3;
    new_inst.un = this->un;
    return new_inst;
}



template <>
x10<A_172>::operator x10<A_174>() const {
    x10<A_174> new_inst;
    new_inst.t = this->t;
    new_inst.k = this->k;
    new_inst.ptr1 = this->ptr1;
    new_inst.ptr2 = this->ptr2;
    new_inst.un1 = this->un1;
    new_inst.ptr3 = this->ptr3;
    new_inst.ptr4 = this->ptr4;
    new_inst.path_str = this->path_str;
    return new_inst;
}




/*
template <AllegroVersion version>
File<version>::operator File<A_174>() const {
    File<A_174> new_file;

    new_file.hdr = this->hdr;
    new_file.layers = this->layers;
    new_file.strings = this->strings;
    for (const auto& [k, v] : this->x01_map)
        new_file.x01_map[k] = upgrade<version, A_174>(v);
    new_file.x03_map = this->x03_map;
    for (const auto& [k, v] : this->x04_map)
        new_file.x04_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x05_map)
        new_file.x05_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x06_map)
        new_file.x06_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x07_map)
        new_file.x07_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x08_map)
        new_file.x08_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x09_map)
        new_file.x09_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x0A_map)
        new_file.x0A_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x0C_map)
        new_file.x0C_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x0D_map)
        new_file.x0D_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x0E_map)
        new_file.x0E_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x0F_map)
        new_file.x0F_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x10_map)
        new_file.x10_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x11_map)
        new_file.x11_map[k] = upgrade<version, A_174>(v);
    new_file.x12_map = this->x12_map;
    for (const auto& [k, v] : this->x14_map)
        new_file.x14_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x15_map)
        new_file.x15_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x16_map)
        new_file.x16_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x17_map)
        new_file.x17_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x1B_map)
        new_file.x1B_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x1C_map)
        new_file.x1C_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x1D_map)
        new_file.x1D_map[k] = upgrade<version, A_174>(v);
    new_file.x1E_map = this->x1E_map;
    for (const auto& [k, v] : this->x1F_map)
        new_file.x1F_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x22_map)
        new_file.x22_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x23_map)
        new_file.x23_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x24_map)
        new_file.x24_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x26_map)
        new_file.x26_map[k] = upgrade<version, A_174>(v);
    new_file.x27_db = this->x27_db;
    for (const auto& [k, v] : this->x28_map)
        new_file.x28_map[k] = upgrade<version, A_174>(v);
    new_file.x2A_map = this->x2A_map;
    for (const auto& [k, v] : this->x2B_map)
        new_file.x2B_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x2C_map)
        new_file.x2C_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x2D_map)
        new_file.x2D_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x2E_map)
        new_file.x2E_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x30_map)
        new_file.x30_map[k] = upgrade<version, A_174>(v);
    new_file.x31_map = this->x31_map;
    for (const auto& [k, v] : this->x32_map)
        new_file.x32_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x33_map)
        new_file.x33_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x34_map)
        new_file.x34_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x36_map)
        new_file.x36_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x37_map)
        new_file.x37_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x38_map)
        new_file.x38_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x39_map)
        new_file.x39_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x3A_map)
        new_file.x3A_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x3B_map)
        new_file.x3B_map[k] = upgrade<version, A_174>(v);
    for (const auto& [k, v] : this->x3C_map)
        new_file.x3C_map[k] = upgrade<version, A_174>(v);
    new_file.layer_count = this->layer_count;
    new_file.x27_end_pos = this->x27_end_pos;

    new_file.stackup_materials = this->stackup_materials;
    new_file.netlist_path = this->netlist_path;

    return new_file;
}

// Explicit instantiations required, because there is nothing to otherwise
// create them within the library code.
template File<A_160>::operator File<A_174>() const;
template File<A_162>::operator File<A_174>() const;
template File<A_164>::operator File<A_174>() const;
template File<A_165>::operator File<A_174>() const;
template File<A_166>::operator File<A_174>() const;
template File<A_172>::operator File<A_174>() const;
*/
